1. Technical Field
This invention generally relates to computer programming and more specifically relates to an apparatus and methods for measuring and analyzing performance of a computer program.
2. Background Art
Since the dawn of the computer age, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware, such as semiconductors and circuit boards, and software, also known as computer programs. As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
As the sophistication and complexity of computer software increase, the more difficult the software is to test. Software applications are typically made up of a number of named code segments, known as procedures, functions, modules, objects, etc. depending on the programming language used. Object oriented applications are characterized by many small code segments, known as methods, that interact with other methods in complex ways. In particular, as the size of a software application grows, it becomes more and more difficult to determine the cause of performance bottlenecks in the application. Known performance analysis tools are designed to detect performance bottlenecks in a particular code segment. However, performance bottlenecks in a complex software application often result not from any one code segment, but instead from the way many of these code segments interact with each other. For these reasons, known performance analysis tools cannot detect performance bottlenecks that result from interactions between multiple code segments. Without a mechanism and method for detecting these types of elusive performance bottlenecks, the computer industry will continue to suffer from inefficient methods and tools for analyzing the performance of a computer program.
According to the present invention, an apparatus and method allow analyzing the performance of a computer program. The computer program is initially executed according to a predefined set of program execution conditions. As the computer program executes, information for each code segment is logged. Using the logged performance data, a graphical representation of the executed computer program is constructed. A user can then formulate ad hoc queries to analyze any desired performance parameters for the computer program by replaying how the computer program ran using the graphical representation of the executed computer program. The present invention thus allows a user to detect via queries complex performance bottlenecks that are caused by interactions between multiple code segments.
The foregoing and other features and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings.